package cn.trda.base.properties;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

public class ProperitesDemo {
		public static void main(String[] args) throws Exception {
			//创建Properties对象
			Properties prop=new Properties() ;
			//从流中加载配置文件
			prop.load(new FileInputStream(new File("src/jdbc.properties")));
			//通过指定的Key获取指定的Value
			String name=prop.getProperty("username");
			System.out.println(name);
		}
}
